package shilin.test.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.apache.ibatis.annotations.Param;
import shilin.test.demo.domain.mapper.MyuserMapper;
import shilin.test.demo.domain.entity.Myuser;
import shilin.test.demo.service.IMyuserService;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author MMinbo
 * @since 2019-10-25
 */
@Service
public class MyuserServiceImpl extends ServiceImpl<MyuserMapper, Myuser> implements IMyuserService {

	@Override
	public Myuser getUserByName(String name) {
		return this.baseMapper.getUserByName(name);
	}

	@Override
	public Myuser getUserById(Integer id) {
		return this.baseMapper.getUserById(id);
	}


	@Override
	public void insert(@Param("id") Integer id, @Param("name") String name, @Param("age") Integer age,@Param("email") String email) {
		 this.baseMapper.insert(id,name,age,email);
	}

	@Override
	public int deleteUserById(Integer id) {
		return this.baseMapper.deleteUserById(id);


	}

	@Override
	public void updateUserById(@Param("id") Integer id, @Param("name") String name, @Param("age") Integer age, @Param("email") String email) {
		 this.baseMapper.updateUserById(id,name,age,email);
	}

}
